﻿using System;
using System.Collections.Generic;
using System.Text;
using Flexible.Interfaces;

namespace Flexible.Implementions.Bases
{
    public class PluginSignature : IPluginSignature
    {
        public PluginSignature(string id, string name, string description,
            string author, Version version, DateTime releaseTime,
            Version compatibleVersion, IEnumerable<IPluginQuery> requirements,
            IEnumerable<IPluginQuery> interests)
        {
            this.id = id;
            this.name = name;
            this.description = description;
            this.author = author;
            this.version = version;
            this.releaseTime = releaseTime;
            this.compatibleVersion = compatibleVersion;
            this.requirements = requirements;
            this.interests = interests;
        }

        readonly IEnumerable<IPluginQuery> requirements;
        readonly IEnumerable<IPluginQuery> interests;
        readonly string name;
        readonly string description;
        readonly string author;
        readonly DateTime releaseTime;
        readonly string id;
        readonly Version version;
        readonly Version compatibleVersion;

        #region IPluginSignature Members

        public IEnumerable<IPluginQuery> Requirements
        {
            get { return requirements; }
        }

        public IEnumerable<IPluginQuery> Interests
        {
            get { return interests; }
        }

        public string Name
        {
            get { return name; }
        }

        public string Description
        {
            get { return description; }
        }

        public string Author
        {
            get { return author; }
        }

        public DateTime ReleaseTime
        {
            get { return releaseTime; }
        }

        public string Id
        {
            get { return id; }
        }

        public Version Version
        {
            get { return version; }
        }

        public Version CompatibleVersion
        {
            get { return compatibleVersion; }
        }

        #endregion
    }
}
